home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume2 / xfig / patch5 next >
Encoding:
Text File  |  1988-11-11  |  5.1 KB  |  209 lines

  1. Path: uunet!wyse!mikew
  2. From: mikew@wyse.wyse.com (Mike Wexler)
  3. Newsgroups: comp.sources.x
  4. Subject: v02i010:  a MacDraw like graphics editor, Patch5
  5. Message-ID: <1810@wyse.wyse.com>
  6. Date: 11 Nov 88 20:36:03 GMT
  7. Organization: Wyse Technology, San Jose
  8. Lines: 198
  9. Approved: mikew@wyse.com
  10.  
  11. Submitted-by: dana@thumper.bellcore.com (Dana A. Chee)
  12. Posting-number: Volume 2, Issue 10
  13. Archive-name: xfig/patch5
  14.  
  15. [BTW, the address for submissions to comp.sources.x is x-sources@wyse.com]
  16.  
  17. Here is the first set of patches for xfig as it came on the R3 source
  18. tape.
  19.  
  20. ==================== xfig.r3.patch1 ====================
  21. *** /tmp/d10855    Wed Nov  9 14:40:48 1988
  22. --- patchlevel.h    Wed Nov  9 14:40:15 1988
  23. ***************
  24. *** 1,2
  25. ! #define PATCHLEVEL 3
  26. ! #define PATCHLEVEL 2
  27.  
  28. --- 1 -----
  29. ! #define PATCHLEVEL 4
  30. *** /tmp/d10858    Wed Nov  9 14:40:48 1988
  31. --- canvas.c    Wed Nov  9 14:06:34 1988
  32. ***************
  33. *** 171,177
  34.       String        *params;
  35.       Cardinal    *nparams;
  36.   {
  37. !     Position    x, y;
  38.       Window        w;
  39.       extern TOOL    menu;
  40.       
  41.  
  42. --- 171,177 -----
  43.       String        *params;
  44.       Cardinal    *nparams;
  45.   {
  46. !     int        x, y;
  47.       Window        w;
  48.       extern TOOL    menu;
  49.       
  50. *** /tmp/d10861    Wed Nov  9 14:40:50 1988
  51. --- main.c    Wed Nov  9 13:25:56 1988
  52. ***************
  53. *** 254,260
  54.       {
  55.           XrmValue    value;
  56.           XrmDatabase newdb = (XrmDatabase) 0;
  57. !         extern XrmDatabase XtDefaultDB;
  58.   
  59.           value.size = sizeof("White");
  60.           value.addr = "White";
  61.  
  62. --- 254,260 -----
  63.       {
  64.           XrmValue    value;
  65.           XrmDatabase newdb = (XrmDatabase) 0;
  66. !         XrmDatabase XtDefaultDB;
  67.   
  68.           XtDefaultDB = XtDatabase(tool_d);
  69.           value.size = sizeof("White");
  70. ***************
  71. *** 256,261
  72.           XrmDatabase newdb = (XrmDatabase) 0;
  73.           extern XrmDatabase XtDefaultDB;
  74.   
  75.           value.size = sizeof("White");
  76.           value.addr = "White";
  77.           XrmPutResource(&newdb, "xfig*borderColor", "String",
  78.  
  79. --- 256,262 -----
  80.           XrmDatabase newdb = (XrmDatabase) 0;
  81.           XrmDatabase XtDefaultDB;
  82.   
  83. +         XtDefaultDB = XtDatabase(tool_d);
  84.           value.size = sizeof("White");
  85.           value.addr = "White";
  86.           XrmPutResource(&newdb, "xfig*borderColor", "String",
  87. *** /tmp/d10864    Wed Nov  9 14:40:51 1988
  88. --- save.c    Wed Nov  9 13:15:18 1988
  89. ***************
  90. *** 170,175
  91.   FILE        *fp;
  92.   F_ellipse    *e;
  93.   {
  94.       fprintf(fp, "%d %d %d %d %d %d %d %d %.3f %d %.3f %d %d %d %d %d %d %d %d\n",
  95.           O_ELLIPSE, e->type, e->style, e->thickness, 
  96.           e->color, e->depth, e->pen, e->area_fill,
  97.  
  98. --- 170,178 -----
  99.   FILE        *fp;
  100.   F_ellipse    *e;
  101.   {
  102. +     if( e->radiuses.x == 0 || e->radiuses.y == 0 )
  103. +         return;
  104. +     
  105.       fprintf(fp, "%d %d %d %d %d %d %d %d %.3f %d %.3f %d %d %d %d %d %d %d %d\n",
  106.           O_ELLIPSE, e->type, e->style, e->thickness, 
  107.           e->color, e->depth, e->pen, e->area_fill,
  108. ***************
  109. *** 187,192
  110.       F_point    *p;
  111.       F_arrow    *f, *b;
  112.   
  113.       fprintf(fp, "%d %d %d %d %d %d %d %d %.3f %d %d\n",
  114.           O_POLYLINE, l->type, l->style, l->thickness,
  115.           l->color, l->depth, l->pen, l->area_fill, l->style_val, 
  116.  
  117. --- 190,197 -----
  118.       F_point    *p;
  119.       F_arrow    *f, *b;
  120.   
  121. +     if( l->points == NULL )
  122. +         return;
  123.       fprintf(fp, "%d %d %d %d %d %d %d %d %.3f %d %d\n",
  124.           O_POLYLINE, l->type, l->style, l->thickness,
  125.           l->color, l->depth, l->pen, l->area_fill, l->style_val, 
  126. ***************
  127. *** 212,217
  128.       F_point        *p;
  129.       F_arrow        *f, *b;
  130.   
  131.       fprintf(fp, "%d %d %d %d %d %d %d %d %.3f %d %d\n",
  132.           O_SPLINE, s->type, s->style, s->thickness,
  133.           s->color, s->depth, s->pen, s->area_fill, s->style_val,
  134.  
  135. --- 217,224 -----
  136.       F_point        *p;
  137.       F_arrow        *f, *b;
  138.   
  139. +     if( s->points == NULL )
  140. +         return;
  141.       fprintf(fp, "%d %d %d %d %d %d %d %d %.3f %d %d\n",
  142.           O_SPLINE, s->type, s->style, s->thickness,
  143.           s->color, s->depth, s->pen, s->area_fill, s->style_val,
  144. ***************
  145. *** 241,246
  146.   FILE    *fp;
  147.   F_text    *t;
  148.   {
  149.       fprintf(fp, "%d %d %d %d %d %d %d %.3f %d %d %d %d %d %s\1\n", 
  150.           O_TEXT, t->type, t->font, t->size, t->pen,
  151.           t->color, t->depth, t->angle,
  152.  
  153. --- 248,255 -----
  154.   FILE    *fp;
  155.   F_text    *t;
  156.   {
  157. +     if( t->length == 0 )
  158. +         return;
  159.       fprintf(fp, "%d %d %d %d %d %d %d %.3f %d %d %d %d %d %s\1\n", 
  160.           O_TEXT, t->type, t->font, t->size, t->pen,
  161.           t->color, t->depth, t->angle,
  162. *** /tmp/d10867    Wed Nov  9 14:40:52 1988
  163. --- search.c    Wed Nov  9 14:07:41 1988
  164. ***************
  165. *** 51,56
  166.           a = e->radiuses.x;
  167.           b = e->radiuses.y;
  168.           dis = sqrt((double)(dx*dx + dy*dy));
  169.           r = a * b * dis / sqrt((double) (b*b*dx*dx + a*a*dy*dy));
  170.           if (fabs(dis - r) <= tol) {
  171.           *px = (int)(r*dx/dis + ((dx < 0) ? -.5 : .5)) + e->center.x;
  172.  
  173. --- 51,61 -----
  174.           a = e->radiuses.x;
  175.           b = e->radiuses.y;
  176.           dis = sqrt((double)(dx*dx + dy*dy));
  177. +         if (dis == 0) {
  178. +             *px = e->center.x;
  179. +             *py = e->center.y;
  180. +             return(e);
  181. +         }
  182.           r = a * b * dis / sqrt((double) (b*b*dx*dx + a*a*dy*dy));
  183.           if (fabs(dis - r) <= tol) {
  184.           *px = (int)(r*dx/dis + ((dx < 0) ? -.5 : .5)) + e->center.x;
  185. *** /tmp/d10870    Wed Nov  9 14:40:52 1988
  186. --- xtra.c    Wed Nov  9 13:58:23 1988
  187. ***************
  188. *** 128,134
  189.   
  190.       if( confirm == NULL )
  191.       {
  192. !         Position    rootx, rooty;
  193.           Window        win;
  194.           Arg        confirm_args[5];
  195.           
  196.  
  197. --- 128,134 -----
  198.   
  199.       if( confirm == NULL )
  200.       {
  201. !         int        rootx, rooty;
  202.           Window        win;
  203.           Arg        confirm_args[5];
  204.           
  205.  
  206. -- 
  207. Mike Wexler(wyse!mikew)    Phone: (408)433-1000 x1330
  208. Moderator of comp.sources.x
  209.